//
//  JSWebMethodManager.m
//  JSWebDemo
//
//  Created by ac-hu on 2018/7/6.
//  Copyright © 2018年 ac-hu. All rights reserved.
//

#import "JSWebMethodManager.h"



@implementation JSWebMethodManager

+(instancetype)share{
    static JSWebMethodManager *jsMethodManager;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (jsMethodManager == nil) {
            jsMethodManager = [[JSWebMethodManager alloc]init];
            [jsMethodManager initProperty];
        }
    });
    return jsMethodManager;
}

-(void)initProperty{
//
    self.methods = @[@"app",@"goWebpage",@"goNativePage",@"togglePush",@"callPhone",@"goBack",@"uploadSelectedImg",@"toPlayVideo",@"payment",@"share",@"thirdPartyLogin",@"getUserInfo",@"locate",@"openMapNavi",@"saveCurrPageCacheUrls",@"reloadSpecialCachedUrls",@"reloadDataWhenComeBack",@"newUploadSelectedImg"].mutableCopy;
}

+(void)addMessageName:(NSString *)name{
    [[JSWebMethodManager share].methods addObject:name];
}

@end

